package com.hgw.imsever.common.utils;

import com.google.common.hash.Funnels;
import com.google.common.hash.Hashing;

import java.nio.charset.Charset;

public class HashingUtils {


    public static long hash(String key) {
        return Math.abs(Hashing.murmur3_128().hashObject(key, Funnels.stringFunnel(Charset.forName("UTF-8"))).asInt());
    }

}
